"TEXT 1"="Enable "DOS Prompt in containing folder" for any file"
"DESCRIPTION 1"="This setting allows you to assign any file on your computer a new right-click menu (context menu) entry."
"DESCRIPTION 2"="This entry is named "DOS Prompt in containing folder" which will simply open a command prompt (DOS Box) in the folder where the file selected is located."
"DESCRIPTION 3"="For example, when you have activated this setting and use the Search function of Windows to located all files named "*conti.dll". Windows might find a file "my-conti.dll" located in the folder E:\My Stuff\Apps\Conti\. Normally, you would have to open a command prompt and CD to "My Stuff", then CD to "Apps" etc."
"DESCRIPTION 4"="When this setting is activated, you simply right-click the file, select "DOS Prompt in containing folder" and a command prompt will open where the folder E:\My Stuff\Apps\Conti\ is pre-selected. "
"AUTHOR"="Xteq Systems"
"CONTACTURL"="http://www.x-setup.net/"
"COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
"COMMENT 1"="Thanks to Alejandro Yakimovsky 'chaico@ciudad.com.ar' for the original idea!"
sName="DOS &Prompt in containing folder"
sNameDOSFile="XSPDOSHere.cmd"
sV1a="HKCR\*\Shell\DosHere"
sV1b="HKCR\*\Shell\DosHere\Command"
Sub Plugin_Initialize
s=RegReadValue(sV1a & "\@")
if Len(s)>0 then
SetUIElement 1,true
end if
End Sub
Sub Plugin_Apply(ElementIndex,ElementSubIndex)
sFileName=GetWinSysDir & sNameDOSFile
sExec=sFileName & " ""%1"""
if GetUIElement(1)=true then
Call RegWriteValue(sV1a & "\@",sName,1)
Call RegWriteValue(sV1b & "\@",sExec,1)
Call KillFile(sFileName)
Call TxtOpen(sFileName)
Call TxtInsertLine(1,"@echo off")
Call TxtInsertLine(2,"REM This file has been created by X-Setup Pro, plug-in <XQ Context Menu Options 6.xpl>")
Call TxtInsertLine(3,"cmd.exe /k cd ""%~d1%~p1""")
Call TxtInsertLine(4,"exit")
Call TxtSave()
else 'Disable it!
if RegPathExists(sV1b) then Call RegDeletePath(sV1b)
if RegPathExists(sV1a) then Call RegDeletePath(sV1a)
Call KillFile(sFileName)
end if
End Sub
Sub Plugin_Terminate
End Sub
Sub KillFile(TheFileName)
if FileExists(TheFileName) then Call FileDelete(TheFileName)